package DQE.GUI;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUI.java
 *
 * Created on 18-nov-2011, 0:00:00
 */
import DQE.DQEProject;
/**
 *
 * @author Migue
 */
public class GUI extends javax.swing.JFrame {
DQEProject parent;
 /**
 * Creates new form GUI
 */
    public GUI(DQEProject parent) {
        this.parent = parent;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainBG = new javax.swing.ButtonGroup();
        mainTB = new javax.swing.JToolBar();
        btSave = new javax.swing.JButton();
        btPrint = new javax.swing.JButton();
        btSaveAsRef = new javax.swing.JButton();
        btConfig = new javax.swing.JButton();
        btHelp = new javax.swing.JButton();
        btExit = new javax.swing.JButton();
        allPanel = new javax.swing.JPanel();
        stepsTB = new javax.swing.JToolBar();
        toggleProy = new javax.swing.JToggleButton();
        toggleLin = new javax.swing.JToggleButton();
        toggleMTF = new javax.swing.JToggleButton();
        toggleNNPS = new javax.swing.JToggleButton();
        toggleDQE = new javax.swing.JToggleButton();
        panes = new javax.swing.JPanel();
        projectPanel = new DQE.GUI.ProjectPanel();
        linealPanel = new DQE.GUI.LinealPanel();
        nnpsPanel = new DQE.GUI.NNPSPanel();
        dqePanel = new DQE.GUI.DQEPanel();
        mtfPanel = new DQE.GUI.MTFPanel();
        statusPane = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jProgressBar1 = new javax.swing.JProgressBar();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        mainTB.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        mainTB.setFloatable(false);
        mainTB.setOrientation(javax.swing.SwingConstants.VERTICAL);
        mainTB.setRollover(true);
        mainTB.setAlignmentY(1.0F);
        mainTB.setMaximumSize(new java.awt.Dimension(100, 500));
        mainTB.setMinimumSize(new java.awt.Dimension(100, 360));
        mainTB.setPreferredSize(new java.awt.Dimension(80, 360));
        mainTB.setRequestFocusEnabled(false);

        btSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Save32.png"))); // NOI18N
        btSave.setText("Guardar");
        btSave.setToolTipText("Save");
        btSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btSave.setMaximumSize(new java.awt.Dimension(75, 57));
        btSave.setMinimumSize(new java.awt.Dimension(70, 57));
        btSave.setPreferredSize(new java.awt.Dimension(75, 57));
        btSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mainTB.add(btSave);

        btPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Print32.png"))); // NOI18N
        btPrint.setText("Imprimir");
        btPrint.setToolTipText("Print");
        btPrint.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPrint.setMaximumSize(new java.awt.Dimension(75, 57));
        btPrint.setMinimumSize(new java.awt.Dimension(70, 57));
        btPrint.setPreferredSize(new java.awt.Dimension(75, 57));
        btPrint.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btPrint.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPrintActionPerformed(evt);
            }
        });
        mainTB.add(btPrint);

        btSaveAsRef.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Ref32.png"))); // NOI18N
        btSaveAsRef.setText("Referencia");
        btSaveAsRef.setToolTipText("Save as reference file");
        btSaveAsRef.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btSaveAsRef.setMaximumSize(new java.awt.Dimension(75, 57));
        btSaveAsRef.setMinimumSize(new java.awt.Dimension(70, 57));
        btSaveAsRef.setOpaque(false);
        btSaveAsRef.setPreferredSize(new java.awt.Dimension(75, 57));
        btSaveAsRef.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mainTB.add(btSaveAsRef);

        btConfig.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Config32.png"))); // NOI18N
        btConfig.setText("Configurar");
        btConfig.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btConfig.setMaximumSize(new java.awt.Dimension(75, 57));
        btConfig.setMinimumSize(new java.awt.Dimension(70, 57));
        btConfig.setPreferredSize(new java.awt.Dimension(75, 57));
        btConfig.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btConfig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btConfigActionPerformed(evt);
            }
        });
        mainTB.add(btConfig);

        btHelp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/help32.png"))); // NOI18N
        btHelp.setText("Ayuda");
        btHelp.setToolTipText("Help");
        btHelp.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btHelp.setMaximumSize(new java.awt.Dimension(75, 57));
        btHelp.setMinimumSize(new java.awt.Dimension(70, 57));
        btHelp.setPreferredSize(new java.awt.Dimension(75, 57));
        btHelp.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mainTB.add(btHelp);

        btExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Exit32.png"))); // NOI18N
        btExit.setText("Salir");
        btExit.setToolTipText("Exit");
        btExit.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btExit.setMaximumSize(new java.awt.Dimension(75, 57));
        btExit.setMinimumSize(new java.awt.Dimension(70, 57));
        btExit.setPreferredSize(new java.awt.Dimension(75, 57));
        btExit.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btExitActionPerformed(evt);
            }
        });
        mainTB.add(btExit);

        getContentPane().add(mainTB);
        mainTB.getAccessibleContext().setAccessibleParent(this);

        allPanel.setLayout(new java.awt.BorderLayout());

        stepsTB.setFloatable(false);
        stepsTB.setRollover(true);

        toggleProy.setText("Proyecto");
        toggleProy.setFocusable(false);
        toggleProy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleProy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toggleProy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleProyActionPerformed(evt);
            }
        });
        stepsTB.add(toggleProy);
        mainBG.add(toggleProy);
        toggleProy.setSelected(true);

        toggleLin.setText("Linealización");
        toggleLin.setFocusable(false);
        toggleLin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleLin.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toggleLin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleLinActionPerformed(evt);
            }
        });
        stepsTB.add(toggleLin);
        mainBG.add(toggleLin);

        toggleMTF.setText("MTF");
        toggleMTF.setFocusable(false);
        toggleMTF.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleMTF.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toggleMTF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleMTFActionPerformed(evt);
            }
        });
        stepsTB.add(toggleMTF);
        mainBG.add(toggleMTF);

        toggleNNPS.setSelected(true);
        toggleNNPS.setText("NNPS");
        toggleNNPS.setFocusable(false);
        toggleNNPS.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleNNPS.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toggleNNPS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleNNPSActionPerformed(evt);
            }
        });
        stepsTB.add(toggleNNPS);
        mainBG.add(toggleNNPS);

        toggleDQE.setText("DQE");
        toggleDQE.setFocusable(false);
        toggleDQE.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleDQE.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        toggleDQE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleDQEActionPerformed(evt);
            }
        });
        stepsTB.add(toggleDQE);
        mainBG.add(toggleDQE);

        allPanel.add(stepsTB, java.awt.BorderLayout.PAGE_START);

        panes.setLayout(new java.awt.CardLayout());
        panes.add(projectPanel, "card2");
        panes.add(linealPanel, "card3");
        panes.add(nnpsPanel, "card5");
        panes.add(dqePanel, "card6");
        panes.add(mtfPanel, "card4");

        allPanel.add(panes, java.awt.BorderLayout.CENTER);

        statusPane.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        statusPane.setLayout(new javax.swing.BoxLayout(statusPane, javax.swing.BoxLayout.LINE_AXIS));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        jLabel1.setText("status");
        statusPane.add(jLabel1);
        statusPane.add(jProgressBar1);

        allPanel.add(statusPane, java.awt.BorderLayout.PAGE_END);

        getContentPane().add(allPanel);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void toggleProyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleProyActionPerformed
        // TODO add your handling code here:
        java.awt.CardLayout cl = (java.awt.CardLayout)(panes.getLayout());
        cl.show(panes, "card2");
    }//GEN-LAST:event_toggleProyActionPerformed

    private void toggleLinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleLinActionPerformed
        // TODO add your handling code here:
        java.awt.CardLayout cl = (java.awt.CardLayout)(panes.getLayout());
        cl.show(panes, "card3");
    }//GEN-LAST:event_toggleLinActionPerformed

    private void toggleMTFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleMTFActionPerformed
        // TODO add your handling code here:
        java.awt.CardLayout cl = (java.awt.CardLayout)(panes.getLayout());
        cl.show(panes, "card4");
    }//GEN-LAST:event_toggleMTFActionPerformed

    private void toggleNNPSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleNNPSActionPerformed
        // TODO add your handling code here:
        java.awt.CardLayout cl = (java.awt.CardLayout)(panes.getLayout());
        cl.show(panes, "card5");
    }//GEN-LAST:event_toggleNNPSActionPerformed

    private void toggleDQEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleDQEActionPerformed
        // TODO add your handling code here:
        java.awt.CardLayout cl = (java.awt.CardLayout)(panes.getLayout());
        cl.show(panes, "card6");
    }//GEN-LAST:event_toggleDQEActionPerformed

private void btConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btConfigActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btConfigActionPerformed

private void btExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btExitActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btExitActionPerformed

    private void btPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPrintActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btPrintActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel allPanel;
    private javax.swing.JButton btConfig;
    private javax.swing.JButton btExit;
    private javax.swing.JButton btHelp;
    private javax.swing.JButton btPrint;
    private javax.swing.JButton btSave;
    private javax.swing.JButton btSaveAsRef;
    private DQE.GUI.DQEPanel dqePanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JProgressBar jProgressBar1;
    private DQE.GUI.LinealPanel linealPanel;
    private javax.swing.ButtonGroup mainBG;
    private javax.swing.JToolBar mainTB;
    private DQE.GUI.MTFPanel mtfPanel;
    private DQE.GUI.NNPSPanel nnpsPanel;
    private javax.swing.JPanel panes;
    private DQE.GUI.ProjectPanel projectPanel;
    private javax.swing.JPanel statusPane;
    private javax.swing.JToolBar stepsTB;
    private javax.swing.JToggleButton toggleDQE;
    private javax.swing.JToggleButton toggleLin;
    private javax.swing.JToggleButton toggleMTF;
    private javax.swing.JToggleButton toggleNNPS;
    private javax.swing.JToggleButton toggleProy;
    // End of variables declaration//GEN-END:variables
}
